/*
 * Copyright (c) 2005 -2008 Reliable Source, Inc. and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Mozilla Public License v.1.1,
 * BSD, and Eclipse Public License v1.0 which accompanies this
 * distribution and is available at:
 *
 * 		http://www.eclipse.org/legal/epl-v10.html
 * 		http://www.opensource.org/licenses/bsd-license.php
 * 		http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * Contributors:
 *     IBM Corporation	     -  http://ibm.com
 *     	- initial API and implementation
 *
 *     Reliable Source, Inc. - http://reliablesource.org
 *
 */
package org.reliablesource.model.core;

/**
 * 
 * IReliableNode.java<br>
 * Created on: Jun 27, 2008<br>
 *
 * @author <a href="mailto:dennis.park@gmail.com">Dennis Park</a>
 *
 * @category
 * @since 1.0
 * @model
 */
public interface IReliableNode extends IReliableElement {

	final public static String CHILDREN = Messages.ReliableModel_3;
	final public static int CHILDREN_IDX = PROP_TABLE_IDX.length + 1;
	final public static String[] PROPERTIES = { CHILDREN };

	/**
	 * 
	 * 
	 * @return
	 * @category getter
	 * @model type="IReliableElement" containment="true"
	 */
	public IReliableElement[] getChildren();

	/**
	 * 
	 * 
	 * @param index
	 * 
	 * @return
	 * @category getter
	 * @model type="IReliableElement" containment="true"
	 */
	public IReliableElement getChild(int index);

	/**
	 * 
	 * 
	 * @param _child
	 * 
	 * @return
	 * @category getter
	 * @model type="IReliableElement" containment="true"
	 */
	public IReliableElement getChild(IReliableElement _child);

	/**
	 * 
	 * 
	 * @param _child
	 * 
	 * @return <code>true</code> if added, otherwise <code>false</code>.
	 * @model
	 */
	public boolean addChild(IReliableElement _child);

	/**
	 * 
	 * 
	 * @param _child
	 * 
	 * @return
	 * @model
	 */
	public boolean removeChild(IReliableElement _child);

	/**
	 * 
	 * 
	 * @param _id
	 * @return
	 * @category getter
	 * @model type="IReliableElement" containment="true"
	 */
	public IReliableElement getChild(String _id);

	/**
	 * 
	 * 
	 * @param _child
	 * @category helper
	 * @model
	 */
	public boolean containsChild(IReliableElement _child);

	/**
	 * @return <code>true</code> if element has children, otherwise
	 *         <code>false</code>.
	 * @category helper
	 * @model
	 */
	public boolean hasChildren();
}
